﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;

namespace AnyOffice.general.email
{
    public partial class box_delete : ModulePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int boxId = (Request.QueryString["box_id"] != null) ? int.Parse(Request.QueryString["box_id"].ToString()) : 0;
            new EmailBoxDao().Delete(base.Conn, boxId, base.User.Identity.Name);
            base.CloseConn();
           // Response.Redirect("box.aspx");
            if (!this.ClientScript.IsStartupScriptRegistered(this.GetType(), "refresh"))
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "refresh", " window.location='box.aspx';window.parent.mail_menu.location.reload();", true);
            }
        }
 

    }
}
